Public Class WaitStateLog_Factory
    Public Function GetDescriptionForState(ByVal sWaitState As String) As String
        Dim oFactory As New DBWaitStateLog_Factory
        Return oFactory.GetDescriptionForState(sWaitState)
    End Function

    Public Function WaitState10PointTrends( _
                ByVal lDatabaseID As Long, _
                ByVal sStartDate As String, _
                ByVal sEndDate As String) As DataTable

        Dim oFactory As New DBWaitStateLog_Factory

        Return oFactory.WaitState10PointTrends(lDatabaseID, sStartDate, sEndDate)
    End Function

    Public Function WaitState10PointTrends( _
            ByVal lDatabaseID As Long, _
            ByVal sStartDate As String, _
            ByVal sEndDate As String, _
            ByVal sWaitState As String) As DataTable

        Dim oFactory As New DBWaitStateLog_Factory

        Return oFactory.WaitState10PointTrends(lDatabaseID, sStartDate, sEndDate, sWaitState)
    End Function

    Public Function WaitStateDetail( _
                        ByVal lDatabaseID As Long, _
                        ByVal sStartDate As String, _
                        ByVal sEndDate As String, _
                        ByVal sWaitState As String) As DataTable

        Dim oFactory As New DBWaitStateLog_Factory

        Return oFactory.WaitStateDetail(lDatabaseID, sStartDate, sEndDate, sWaitState)
    End Function

    Public Sub RemoveExpiredData()
        Dim oConfiguration As New Config_Factory
        Dim iExpirationPeriod As Integer = oConfiguration.GetValueFromName("WAITSTATE_RETENTION_PERIOD")

        Dim oFactory As New DBBlockLog_Factory

        oFactory.RemoveExpiredData(iExpirationPeriod)
    End Sub
End Class
